#include<bits/stdc++.h>
using namespace std;
 
int main(){ 
    int a[3];
    while(cin>>a[0]>>a[1]>>a[2]){
        sort(a,a+3);
        if(a[0]+a[1]<=a[2]){
            cout<<"ERROR\n";
        }else if(a[0]==a[1]&&a[1]==a[2]){
            cout<<"DB\n";
        }else if(a[0]==a[1]||a[1]==a[2]||a[0]==a[2]){
            cout<<"DY\n";
        }else if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2]){
            cout<<"ZJ\n";
        }else{
            cout<<"PT\n";
        }
    }
    return 0;
}
